import { Rule, RuleType } from '@midwayjs/decorator';
/**
 * 描述
 */
export class CreateWeiBoDTO {
  @Rule(RuleType.string().required())
  type: string;

  @Rule(RuleType.string().required())
  title: string;

  @Rule(RuleType.string().required())
  comment: string;

  @Rule(RuleType.array().description('图片URL'))
  pics: string;

  @Rule(RuleType.array().description('shop_goods.id'))
  goods: [number];

  @Rule(RuleType.array().description('activity.id'))
  activity: [number];

  @Rule(RuleType.array().description('#话题'))
  tags: [number];

  @Rule(RuleType.string())
  video?: string;

  @Rule(RuleType.string())
  audio?: string;

  @Rule(RuleType.string())
  ipAddr?: string;

  @Rule(RuleType.string())
  userId: number;

  // size
  @Rule(RuleType.number().required().default(20))
  size: number;

  @Rule(RuleType.string().required().default('addtime'))
  order: string;

  @Rule(RuleType.number().required().default(1))
  page: number;

  @Rule(RuleType.string())
  keyWord: string;
}

export class AddCommentDTO {
  @Rule(RuleType.number().required())
  blogId: number;

  @Rule(RuleType.string().required())
  content: string;

  @Rule(RuleType.number())
  parentCommentId?: number;

  @Rule(RuleType.number())
  parentCommentUserId?: number;

  @Rule(RuleType.number())
  replyCommentId?: number;

  @Rule(RuleType.number())
  replyCommentUserId?: number;
}
